import { PluginOption } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'

export const createAutoImport = (): PluginOption => {
  return AutoImport({
    dts: 'types/auto-imports.d.ts',
    imports: [
      'vue',
      'vue-router',
      'pinia',
      {
        'naive-ui': ['useDialog', 'useMessage', 'useNotification', 'useLoadingBar'],
      },
    ],
  })
}
